<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/template/comum/menu.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml">
    <ui:define name="conteudo">
        <h:form class="form-horizontal" prependId="true" id="form" >
            <div class="span6" >
                <div class="control-group">
                    <div class="page-header">
                        <h3>Relatório <span  class="muted">Extrato conta de capital</span></h3>
                    </div>
                </div>  
                <div class="pull-right">
                    <span class="new">
                        <h:commandLink action="#{relatorioController.gerarRelatorioExtrato}" styleClass="btn btn-primary" target="_blank">
                            <i class="icon-file icon-white"> <!--  --> </i> <font color="white">Gerar</font>
                        </h:commandLink>
                    </span>
                </div>
                <div class="control-group">
                    <h:outputLabel value="Data inicial" for="dataInicial" styleClass="control-label"/>
                    <div class="controls">
                        <div class="input-append date datepicker" data-date="12-02-2012">
                            <h:inputText id="dataInicial" value="#{relatorioController.filtro.dataInicial}" 
                                         title="Data inicial" class="input-medium" required="true" requiredMessage="Data inicial é requerida!">
                                <f:convertDateTime pattern="dd/MM/yyyy" type="date"/>
                            </h:inputText>
                            <span class="add-on"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <h:outputLabel value="Data final" for="dataFinal" styleClass="control-label"/>
                    <div class="controls">
                        <div class="input-append date datepicker" data-date="12-02-2012">
                            <h:inputText id="dataFinal" value="#{relatorioController.filtro.dataFinal}" 
                                         title="Data final" class="input-medium" required="true" requiredMessage="Data final é requerida!">
                                <f:convertDateTime pattern="dd/MM/yyyy" type="date"/>
                            </h:inputText>
                            <span class="add-on"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <h:outputLabel value="Conta" for="conta" styleClass="control-label"/>
                    <div class="controls">
                        <h:selectOneMenu value="#{relatorioController.filtro.conta}" id="conta" required="true" requiredMessage="Selecione a conta"> 
                            <f:selectItems value="#{relatorioController.selectContaCapital}" var="conta" itemLabel="#{conta.ctaDescricao}" itemValue="#{conta}"/>
                        </h:selectOneMenu>
                    </div>
                </div>
                <hr />
            </div>
        </h:form>
    </ui:define>
</ui:composition>
